package shardkv

//
// Sharded key/value server.
// Lots of replica groups, each running op-at-a-time paxos.
// Shardmaster decides which group serves each shard.
// Shardmaster may change shard assignment from time to time.
//
// You will have to modify these definitions.
//

const (
  OK = "OK"
  ErrNoKey = "ErrNoKey"
  ErrWrongGroup = "ErrWrongGroup"
  ErrNotReady = "ErrNotReady"
)
type Err string

type PutArgs struct {
  UID int64
  Key string
  Value string
}

type PutReply struct {
  Err Err
}

type GetArgs struct {
  UID int64
  Key string
}

type GetReply struct {
  Err Err
  Value string
}

type ReceiveArgs struct {
    UID_CFG string  // UID of reconfig action
    ShardNum int    // Shard Id
    Num int         // configuration number s.t. reconfig Num --> Num+1
    Shard map[string]string     // key/value in this shard
    RequestCache map[int64]ReqR // request cache for this shard
}

type ReceiveReply struct {
    Err Err
}

type Pair struct {
	Key string
	Value string
}

type PutsArgs struct {
  UID int64
	Pairs []Pair
}

type PutsReply struct {
  Err Err
}


